﻿@model PagedList.IPagedList<UscSunShine.Models.Post>
@using PagedList.Mvc;

@*<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />*@

@{
    ViewBag.Title = "政策法规";
}

<div id="last-of-page2" class="row">
    <div class="col-md-3">
        <nav class="navbar navbar-default" role="navigation">
            <div id="example-navbar-collapse">
                <ul class="nav nav-pills nav-stacked">
                    <li><img width="100%" src="~/image/load.jpg" /></li>
                    @foreach (var item in @ViewBag.departmentList)
                    {
                        string name = @item.Name;
                        int ID = @item.ID;
                        <li><span style="margin-left:5px;" class="glyphicon glyphicon-arrow-right">&nbsp;@Html.ActionLink(name, "Policy", new { currentDepartmentID = ID }, new { @style="color:white;"})</span></li>
                        @*<li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>纪委监察处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>组织部</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>宣传统战部</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>学生工作部</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>武装部保卫处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>党校</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>教务处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>人事处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>科技处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>学科建设处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>产学研办公室</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>招生就业处</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-arrow-right"></span>财务处</a></li>*@
                    }
                </ul>
            </div>
        </nav>
    </div>
    <div class="col-md-9">
        <table class="table">
            <thead>
                <tr>
                    <td width="85%">
                        <strong>您的位置：首页>>@ViewBag.Title>>所有小类</strong>
                    </td>
                    <td>
                        共@(ViewBag.postCount)篇
                    </td>
                </tr>
                <tr>
                    <th width="85%">
                        主题
                    </th>
                    <th>
                        录入时间
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                <tr>
                    <td width="85%">
                        <span class="glyphicon glyphicon-circle-arrow-right">&nbsp;</span>@Html.ActionLink(item.Title, "../Post/Details", new { id = item.ID })
                    </td>
                    <td>
                        [@item.InputDate.Year-@item.InputDate.Month-@item.InputDate.Day]
                    </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
    <center>
        @*Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount*@
        @Html.PagedListPager(Model, page => Url.Action("Policy", new { currentDepartmentID = ViewBag.currentDepartment, page = page }),
             new PagedListRenderOptions { PageCountAndCurrentLocationFormat = "Page {0} of {1}", LinkToFirstPageFormat = "<< 首页", LinkToPreviousPageFormat = "< 上一页", LinkToNextPageFormat = "下一页 >", LinkToLastPageFormat = "尾页 >>", MaximumPageNumbersToDisplay = 5 })
    </center>
</div>